import request from '@/utils/request'

// 查询讲者列表
export function listSpeaker(query) {
  return request({
    url: '/speaker/list',
    method: 'get',
    params: query
  })
}

// 新增讲者
export function addSpeaker(data) {
  return request({
    url: '/speaker',
    method: 'post',
    data: data
  })
}

// 更新讲者
export function updateSpeaker(data) {
  return request({
    url: '/speaker/update',
    method: 'post',
    data: data
  })
}

// 删除单个讲者
export function delSpeaker(userId) {
  return request({
    url: '/speaker/' + userId,
    method: 'delete'
  })
}

// 获取单个讲者详情
export function getSpeaker(id) {
  return request({
    url: '/speaker/' + id,
    method: 'get'
  })
}

// 批量单个讲者
export function batchSpeaker(data) {
  return request({
    url: '/speaker/batch',
    method: 'delete',
    data: data
  })
}
